package com.junch.stringbootdemo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName HelloController
 * @Description TODO
 * @Author Ivy
 * @Date 2021-03-17 21:55
 * @Version 1.0
 **/
@RestController
@RequestMapping("/jump")
public class HelloController {
    @GetMapping("/hello")
    public String hello(@RequestParam(value = "name", defaultValue = "World") String name) {
        return String.format("Hello %s!", name);
    }

    @RequestMapping("to-oa")
    public String index(){
        return "hello String Boot 2.0";
    }
}
